<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<div id="root"></div>
</body>
<script>
	const xhr = new XMLHttpRequest();
	xhr.responseType = "json";
	// http://zhangpeiyue.com
	// http://localhost
	// http://192.168.16.58
	// http://127.0.0.1
	xhr.open("get","/home");
	xhr.send();
	xhr.onload = function(){
		// console.log(xhr.response);
		document.querySelector("#root").innerHTML = xhr.response.map(item=>(`
			<div>
				<h3>${item.userName}</h3>
				<hr/>
			</div>
		`)).join("")
	}
</script>
</html>